﻿<!--{inc(header.view.html)}-->
<?php
  if (!isset($_GET['page'])) {
     $_GET['page'] = 1 ;
  }
?>
<div class="content" id="content">
	<div class="top-menu-box">
    	<div class="z">
            <span class="z-f"><a href="#">内容管理</a>&nbsp;&gt;</span>
            <span class="z-f"><a href="#">产品信息列表</a></span>
            <div class="z-f-r"><span class="user-t">当前语言为：</span><span class="user-info"><?php echo $GLOBALS['langdata'][$GLOBALS['langtype']] ;?></span><!-- <a href="#">退出</a> --></div>
        </div>
        <div class="top-menu">
        	<ul>
            	<li class="current"><a href="#">产品信息列表</a></li>
      <li><a href="index.php?app=prot&act=add"  target="mainframe">新增产品信息</a></li>
      <li><a href="index.php?app=prot&act=cagrylist"  target="mainframe">产品分类列表</a></li>
      <li><a href="index.php?app=prot&act=cagryadd"  target="mainframe">新增产品分类</a></li>		
            </ul>
            <div class="clear"></div>
        </div>
    </div>
    
    <div class="main">

<style type="text/css">
.search_box {
padding:10px;
vertical-align:middle;
}
.search_box .l {
float:left;
vertical-align:middle;
}
.search_box .r {
float:right;
}
</style>
                                   
<script language="javascript" type="text/javascript">

function ato_catid_url(url,obj){
	document.location.href = url+"&catid="+obj.value;
}
function ato_condition_url(url,obj){
	document.location.href = url+"&condition="+obj.value;
}
</script>                                    
                                   
<form  method="post" action="?app=prot&act=index&condition={$condition}&catid={$catid}&v={$v}" >
<div class="search_box">
<div class="l"><img  src="{$web_view_dir}style/images/it_nav.gif" align="middle">
排序方式: 
<select  onchange="ato_url('index.php?app=prot&act=index&condition={$condition}&catid={$catid}&word={$word}',this);" id="orderby">
<option class="txtgreen" value="0">请选择...</option>
<option value="timeasc" <?php if ($v=='timeasc') { ?>selected="selected" <?php } ?> >时间升序↑</option>
<option value="timedesc" <?php if ($v=='timedesc') { ?>selected="selected" <?php } ?> >时间降序↓</option>
<option value="showyes" <?php if ($v=='showyes') { ?>selected="selected" <?php } ?> >显示</option>
<option value="showno" <?php if ($v=='showno') { ?>selected="selected" <?php } ?> >隐藏</option>
<option value="topyes" <?php if ($v=='topyes') { ?>selected="selected" <?php } ?> >置顶</option>
<option value="topno" <?php if ($v=='topno') { ?>selected="selected" <?php } ?> >不置顶</option>
<option value="recyes" <?php if ($v=='recyes') { ?>selected="selected" <?php } ?> >推荐</option>
<option value="recno" <?php if ($v=='recno') { ?>selected="selected" <?php } ?> >不推荐</option>
<option value="indexyes" <?php if ($v=='indexyes') { ?>selected="selected" <?php } ?> >主页头条</option>
<option value="indexno" <?php if ($v=='indexno') { ?>selected="selected" <?php } ?> >非主页头条</option>
</select>
&nbsp;&nbsp;分类查询: 
<select  onchange="ato_catid_url('index.php?app=prot&act=index&condition={$condition}&word={$word}&v={$v}',this);" id="orderby">
<option class="txtgreen" value="0">请选择...</option>
<?php foreach ($categorydata as $_key => $_value) { ?>
<option value="{$_value.cat_id}" <?php if ($catid==$_value.cat_id) { ?>selected="selected" <?php } ?> >{$_value.str_pad}{$_value.cat_name}</option>
<?php } ?>
</select>
&nbsp;&nbsp;筛选: 
<select  onchange="ato_condition_url('index.php?app=prot&act=index&catid={$catid}&word={$word}&v={$v}',this);" id="orderby">
<option class="txtgreen" value="0">请选择...</option>
<option value="showyes" <?php if ($condition=='showyes') { ?>selected="selected" <?php } ?> >显示</option>
<option value="showno" <?php if ($condition=='showno') { ?>selected="selected" <?php } ?> >隐藏</option>
<option value="topyes" <?php if ($condition=='topyes') { ?>selected="selected" <?php } ?> >置顶</option>
<option value="topno" <?php if ($condition=='topno') { ?>selected="selected" <?php } ?> >不置顶</option>
<option value="recyes" <?php if ($condition=='recyes') { ?>selected="selected" <?php } ?> >推荐</option>
<option value="recno" <?php if ($condition=='recno') { ?>selected="selected" <?php } ?> >不推荐</option>
<option value="indexyes" <?php if ($condition=='indexyes') { ?>selected="selected" <?php } ?> >主页头条</option>
<option value="indexno" <?php if ($condition=='indexno') { ?>selected="selected" <?php } ?> >非主页头条</option>
</select>
</div>

<div class="r">
<input type="text" title="多个关键字用空格隔开" value="{$word}" name="word"> <input type="submit" value="搜索标题" class="buton">
</div>

</div>
</form>

    
    <div class="clear"></div>
	
  <form name="form_work" method="post" action="?app=prot&act=index&job=work"> 	
    <table  class="data" >
        <thead>

          <th>ID</th>
          <th>产品名</th>
          <th>分 类</th>
          <th>发布时间</th>
          <th>会员评论</th>	          
          <th>操作</th>			
		
		
        </thead>
	    <tbody>
		
        <!--{foreach($lw_data as $_key => $_value )}-->
        
        <tr  >
	<td  align="center"  style="width:90px;">
	<input type="checkbox"  value="{$_value.id}" id="userids" name="checkdata[]">{$_value.id}
	</td>          
          <td><a href="{SITE_URL}/?app=prot&act=show&id={$_value.id}" target="_blank">{$_value.title}</a></td>
          <td><!--{if(isset($categorylist[$_value.cat_id]))}-->{$categorylist[$_value.cat_id]}<!--{/if}--></td>
          <td>{$_value.add_time|dateymdgis}</td>
          <td><a href="?app=prot&act=huilist&id={$_value.id}" target="mainframe">查看</a></td>		  
          <td><!--<a href="#" id="op_{$_key}" onMouseOver="show_menu('op_{$_key}','opdiv_{$_key}','show','left')" onMouseOut="show_menu('op_{$_key}','opdiv_{$_key}','hide','left')"><img src="{$web_view_dir}style/images/menu_edit.gif" align="absmiddle" border="0" /></a>
            <div id="opdiv_{$_key}" class="operate operate_common">--> <a href="?app=prot&act=edit&id={$_value.id}" target="mainframe">修改</a>/<a href="?app=prot&act=del&id={$_value.id}" onClick="return confirm('确认删除此项？此操作无法恢复！');">删除</a> <!--</div>--></td>
        </tr>
        
        <!--{/foreach}-->
          
      <style type="text/css">

.p_bar {
margin-top:5px;
}
.p_info {
border:1px solid #CCCCCC;
margin:0 3px;
padding:3px 5px;
text-align:center;
}
.p_curpage {
border:1px solid #CCCCCC;
color:#FF0000;
font-weight:bold;
margin:0 2px;
padding:3px 5px;
text-align:center;
}

.p_num  {
border:1px solid #CCCCCC;
margin:0 3px;
padding:3px 5px;
text-align:center;
}
.p_redirect {
border:1px solid #CCCCCC;
margin:0 3px;
padding:3px 5px;
text-align:center;
}

a {
color:#003366;
text-decoration:none;
}


</style>
      <tr>
        <td colspan="7"><div class="p_bar"> 
		<span class="p_info">Total:&nbsp;<b>{$lw_page.total}</b>&nbsp;&nbsp;共{$lw_page.curr.num}/{$lw_page.totalpage}页</span> 
		<a class="p_num" href="{$lw_page.head}">首页</a>
		<a class="p_num" href="{$lw_page.up}">&lt;&lt;</a> 
		<a class="p_num" href="{$lw_page.up}">上一页</a> 
		<span class="p_curpage">{$lw_page.curr.num}</span> 
		<a  class="p_num" href="{$lw_page.down}">下一页</a> 
		<a  class="p_num" href="{$lw_page.down}">&gt;&gt;</a>
		<a  class="p_num" href="{$lw_page.foot}">末页</a> 
		<span class="p_info">
		<form action="?app=prot&act=index" method="get"  target="mainframe">		
           	&nbsp;&nbsp;跳转到:<input type="text"  name="page"  style="width: 40px;" /> 页
			<input type="submit"  class="buton" value="GO" />
			<input  name="app"  value="prot" type="hidden"/> 
            <input  name="act"  value="index" type="hidden"/>
            <input  name="condition"  value="{$condition}" type="hidden"/>
            <input  name="catid"  value="{$catid}" type="hidden"/>
            <input  name="word"  value="{$word}" type="hidden"/>
            <input  name="v"  value="{$v}" type="hidden"/>				
			</form> 		
        </span>			
		</div></td>
      </tr>

<tr>
	<td colspan="7">
	   <a href="javascript:" onClick="CheckAll('all')">全选</a>/<a href="javascript:" onClick='CheckAll()'>反选</a> 	
	   <input type="hidden" name="jobs" value="0">
	   <input type="button" name="Submit3" value="批量删除" onClick="postdo('del')" class="buton">
        <input type="button" name="Submit2" value="审核" onclick="postdobatch('is_show:1')" class="buton">
        <input type="button" name="Submit2" value="取消审核" onclick="postdobatch('is_show:0')" class="buton">		 	
        <input type="button" name="Submit42223" value="推荐" onclick="postdobatch('is_recommend:1')" class="buton">
        <input type="button" name="Submit42223" value="取消推荐" onclick="postdobatch('is_recommend:0')" class="buton">		
        <input type="button" name="Submit4" value="置顶" onclick="postdobatch('is_top:1')" class="buton">
        <input type="button" name="Submit4" value="取消置顶" onclick="postdobatch('is_top:0')" class="buton">		
        <input type="button" name="Submit4" value="首页显示" onclick="postdobatch('is_index:1')" class="buton">
        <input type="button" name="Submit4" value="取消首页显示" onclick="postdobatch('is_index:0')" class="buton">
        <input type="button" name="Submit22" value="静态" onClick="postdobatch('html')" class="buton">	
<br/><br/>
分类移动：		
<select name='moveselect'  id="moveselect">
<option class="txtgreen" value="0">请选择...</option>
<?php foreach ($categorydata as $_key => $_value) { ?>
<option value="{$_value.cat_id}">{$_value.str_pad}{$_value.cat_name}</option>
<?php } ?>
</select>				  
<input type="button" name="Submit42222" value="移动" onclick="postdobatch('move')" class="buton">	   
<SCRIPT LANGUAGE="JavaScript">
<!--
function postdo(va){
	document.form_work.action='?app=prot&act='+va+'';
	document.form_work.jobs.value=va;
	document.form_work.submit();
}
function postdobatch(va){
	if(va=='move'){
		document.form_work.action='?app=prot&act=batch&selcetid='+document.getElementById('moveselect').value+'';
	}else
	{
	document.form_work.action='?app=prot&act=batch';	
	}

	document.form_work.jobs.value=va;
	document.form_work.submit();
}
function CheckAll(va){
	form=document.form_work
	for (var i=0;i<form.elements.length;i++){
		var e = form.elements[i];
		if(va=='all'){
			e.checked = true;
		}else{
			e.checked == true ? e.checked = false : e.checked = true;
		}
	}
}
//-->
</SCRIPT>		   
	   
    </td>
</tr>          
      
		
	    </tbody>
    </table>
	
</form> 
	
        
        <div class="notic"><img  src="{$web_view_dir}style/images/light.gif" align="absmiddle" /> <b>提示: </b> <span ></span> </div>
    </div>
</div>
<!--{inc(footer.view.html)}-->